a6cef2375a0334ca5e7c987f01dfb5daaf26982e,clc/modules/cluster-manager/src/edu/ucsb/eucalyptus/cloud/cluster/VmTypes.java,VmTypes,update,#String#number#number#number#,21

Before Change


      return;
    VmType temp = new VmType(name, cpu, disk, memory );
    for( VmType vm : VmTypes.list() )
      if( !vm.getName().equals( name )  && vm.compareTo( temp ) == 0 && temp.compareTo( vm ) == 0 )
        throw new EucalyptusCloudException( "Proposed VmType fails to satisfy well-ordering requirement.");
    EntityWrapper<VmType> db = new EntityWrapper<VmType>();
    try
    {
      sameVm = db.getUnique( new VmType( name ) );
      sameVm.setCpu( cpu );
      sameVm.setDisk( disk );
      sameVm.setMemory( memory );

After Change


      if( !singleton.vmTypeMap.containsValue( newVm ) ) {
        EntityWrapper<VmType> db = new EntityWrapper<VmType>();
        try {
          VmType oldVm = db.getUnique( new VmType( newVm.getName() ) );
          oldVm.setCpu( newVm.getCpu() );
          oldVm.setDisk( newVm.getDisk() );
          oldVm.setMemory( newVm.getMemory() );